﻿#ifndef _ITABLEPROXY_H_H_
#define _ITABLEPROXY_H_H_

#include "kernel/Referenced.h"
#include "udatabase/dll_cfg.h"
#include "kernel/variant.h"
#include "kernel/string_def.h"

namespace FD
{
	namespace Utility
	{
		namespace DB
		{
			namespace Interface
			{
				/// <summary>
				/// 字段类基类
				/// </summary>
				class FD_DB_Export ITableProxy : public FD::Kernel::CReferenced
				{
				public:
					/// <summary>
					/// 默认析构函数      
					/// </summary>
					virtual ~ITableProxy();
					/// <summary>
					/// 获取指定表达式下最大值
					/// </summary>
					/// <param name="expression">表达式</param>
					/// <returns>返回最爱值</returns>
					virtual FD::Kernel::Variant max(const String &expression);
					/// <summary>
					/// 获取指定表达式下最小值
					/// </summary>
					/// <param name="expression">表达式</param>
					/// <returns>返回最小值</returns>
					virtual FD::Kernel::Variant min(const String &expression);
					/// <summary>
					/// 获取字段值数组
					/// </summary>
					/// <param name="fieldName">字段名</param>
					/// <param name="isUnique">是否唯一</param>
					/// <returns>返回字段值数组</returns>
					virtual FD::Kernel::VariantArray column(const String &fieldName,bool isUnique=false);

				protected:
					ITableProxy();
				};
			}
		}
	}
}

#endif //_ITABLEPROXY_H_H_

